@(message: List[models.my.MyMessage],ptui: models.user.PortraitUserInfo)
@js_css={
<script type="text/javascript">
	$(document).ready(function(){
		$(".nav.navbar-nav li").removeClass("active");
		$(".nav.navbar-nav li").eq(4).addClass("active");
	});
</script>
}
@import utils.StringUtils
@main("消息中心",js_css) {
<div class="col-xs-10 col-md-10 col-xs-offset-1">

	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">消息</h3>
		</div>
		<div class="panel-body">
			<div class="col-xs-2 col-md-2">
				<div class="col-xs-12">
					<a class="thumbnail" href="/myprofile"> <img alt="100%x180"
						data-src="./js/holder.min.js/100%x180"
						@if(ptui.portrait == null || ptui.portrait == ""){
						src="http://meng-user.qiniudn.com/pic.png"
						}else{
							src="@ptui.portrait"
						}>
					</a>
				</div>
				<div class="col-xs-12 col-md-12">
					<div class="col-xs-10 col-xs-offset-1">@session.get("username")</div>
				</div>
			</div>
			<div class="col-xs-10">
				<ul class="nav nav-tabs" style="margin-bottom: 15px;">
					<li class="active"><a href="#message" data-toggle="tab">站内消息</a></li>
				</ul>
				<div id="myTabContent" class="tab-content">

					<div class="tab-pane fade active in" id="message">
						<div class="col-xs-12">
							<table class="table table-responsive">
								<tbody>
								   @if(message == null || message.size()  == 0){
								   <tr>
									  <td>暂时没有任何消息.</td>
								   </tr>
								   } else {
								   	    <thead>
											<td>序号</td>
											<td>日期</td>
											<td>标题</td>
											<td>消息</td>
									    </thead>
									   @for(i <- 0 to message.size()-1){
										<tr>
											<td>@(i+1)</td>
											<td>@StringUtils.convertStanderDate(message.get(i).create_at)</td>
											<td><a href="">@message.get(i).message</a></td>
											<td>@message.get(i).content</td>
										</tr>
										}	
									}
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
}
